package com.qch.demo;

/**
 * @Author qch
 * @Date 2021/8/9
 */
public class MyClassLoaderTest {
    public static void main(String[] args) {
        MyClassLoader myClassLoader = new MyClassLoader("d:/");
        try {
            Class<?> aClass = myClassLoader.loadClass("TestMain");
            System.out.println("TestMain字节码是由"+aClass.getClassLoader().getClass().getName()+"加载的");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
}
